//ALL BELOW IS MOTIF STUFF


/* *************************************************************
				Available Test Tags
	
--------------------------------
	Streaming Video
--------------------------------
Sample 1: http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvstreaming;which=sample1;sz=320x240 
Sample 2: http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvstreaming;which=sample2;sz=320x240 
Sample 3: http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvstreaming;which=sample3;sz=320x240 
Sample 4: http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvstreaming;which=sample4;sz=320x240 
Sample 5: http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvstreaming;which=sample5;sz=320x240 

--------------------------------
	Progressive Video
--------------------------------
Sample 1: http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvprogressive;which=sample1;sz=320x240 
Sample 2: http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvprogressive;which=sample2;sz=320x240 
Sample 3 with 300x250 Companion: http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvprogressive;which=sample3;sz=320x240;tile=1 
Sample 4: http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvprogressive;which=sample4;sz=320x240 
Sample 5: http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvprogressive;which=sample5;sz=320x240 
	
************************************************************* */

f2Companion.adSize = "300x250";	//Tell F2 Companion holder what it's creative size is (width and height)
var DARTord:Number = Math.floor(Math.random()*100000);	//required for Motif for in-Stream ad requests
var inStreamAd:String = "http://ad.doubleclick.net/pfadx/TestSite_inStream/_default;type=flvprogressive;which=sample3;tile=1;sz=320x240;ord=" + DARTord;
var publisherContent:String = "http://motifcdn2.doubleclick.net/inStream/FLV/Gates_High.flv";

/* *********************************************************
	Callback Functions triggered by Motif Ad Holder
********************************************************* */

function onCustomEvent(eventName, eventObject):Void {
	logEvent("custom event \"" + eventName + "\" fired");
}
function onExpand(Void):Void {
	logEvent("Ad has expanded");
}
function onVideoMute(Void):Void {
	logEvent("Video muted - callback received");
}
function onVideoPlay(Void):Void {
	logEvent("Video played - callback received");
}

function onVideoPause(Void):Void {
	logEvent("Video paused - callback received");
}
function onVideoMidpoint(Void):Void {
	logEvent("Video midpoint - callback received");
}
function onVideoRestart(Void):Void {
	logEvent("Video restarted - callback received");
}
function onVideoComplete(Void):Void {
	logEvent("Video completed - callback received");
	logEvent("******* LOAD PUBLISHER CONTENT *********\n");	
	_root.flvPlayer.contentPath = this.publisherContent;
}

function onVideoClick(Void):Void {
	logEvent("Video clicked - callback received");
}

/* *********************************************************
	Logger
********************************************************* */

function logEvent(msg)
{
	myText.text = msg + "\n" + myText.text;
}